<?php $this->load->view('home/layout/header') ?>
<?php $loginUrl = $this->uid ? '' : site_url('login/login/index'); ?>
    <div class="user-tian widthMax">
        <div class="user-head">
            <div class="user-status">
                <a href="<?php echo $loginUrl ? $loginUrl : site_url('home/ucenter/baseInfoSet'); ?>">
                    <i class="iconfont icon-shezhi"></i>
                </a>
                <?php if ($this->uid) : ?>
                <div class="status-id">
                    <?php echo  ($this->userTypeName == '消费者') ? '会员' : $this->userTypeName; ?>
                </div>
                <?php endif; ?>
            </div>
            <a href="<?php echo $loginUrl ? $loginUrl : site_url('home/ucenter/baseInfoSet') ?>" class="user-port">
                <div class="user-man">
                    <img src="<?php echo (isset($userInfo) && $userInfo->personal_photo) ? $this->config->show_image_url($userInfo->personal_photo) : '/skins/common/images/photo0.jpg';?>">
                </div>
                <p><?php echo $loginUrl ? '登录/注册' : ($userInfo->alias_name ? $userInfo->alias_name : ($userInfo->user_name ? $userInfo->user_name : $userInfo->mobile_phone)); ?></p>
            </a>
            <div class="user-price flex">
                <a href="<?php echo $loginUrl ? $loginUrl : site_url('home/account/index'); ?>" class="money flex">
                    <i class="Icon iconfont icon-zhanghuyue"></i>
                    <div class="money-num flex-1">
                        <h5>￥<?php if(isset($userInfo)){echo number_format($userInfo->amount_carry, 2, '.', ',');}else{echo 0;} ?></h5>
                        <p>现金账户<i class="iconfont icon-youjiantou"></i></p>
                    </div>
                </a>
                <a href="<?php echo 'javascript:;';//site_url('home/discountMall/show'); ?>" class="money integral flex">
                    <i class="Icon iconfont icon-jifen"></i>
                    <div class="money-num flex-1">
                        <h5 class="flex">
                            <i>
                                <?php if (isset($userInfo) && ($userInfo->amount_bonus > 0)){echo $userInfo->amount_bonus;} else {echo 0;};?>
                                <!-- <div class="money-use">
                                    立即使用
                                </div> -->
                            </i>
                        </h5>
                        <p>积分<!-- <i class="iconfont icon-youjiantou"></i> --></p>
                    </div>
                </a>
            </div>
        </div>
        <div class="user-order">
            <ul class="flex">
                <li>
                    <a href="<?php echo $loginUrl ? $loginUrl : site_url('home/collection/tourismCollectionList'); ?>">
                        <i class="iconfont icon-shoucang"></i>
                        <p>我的收藏</p>
                    </a>
                </li>
                <li>
                    <a href="<?php echo $loginUrl ? $loginUrl : site_url('home/reviews/tourismReview'); ?>">
                        <i class="iconfont icon-pingjia"></i>
                        <p>我的评价</p>
                    </a>
                </li>
                <li>
                    <a href="<?php echo $loginUrl ? $loginUrl : site_url('home/ucenter/qrCode'); ?>">
                        <i class="iconfont icon-tuijian"></i>
                        <p>推荐</p>
                    </a>
                </li>
            </ul>
        </div>
        <div class="user-order order-list">
            <div class="flex">
                <h5 class="flex-1">我的订单</h5>
                <div class="right-link"><a href="<?php echo $loginUrl ? $loginUrl : site_url('tourism/user/orderList'); ?>">查看更多订单 <i class="iconfont icon-youjiantou"></i></a></div>
            </div>
            <ul class="flex">
                <?php $i = 1; foreach ($orderStatus as $key => $value) : ?>
                <li>
                    <a href="<?php echo $loginUrl ? $loginUrl : site_url('tourism/user/orderList').'?status='.$i; ?>">
                        <i class="iconfont <?php echo $iconStatus[$key]; ?>"></i>
                        <p><?php echo $value ?></p>
                        <?php if (isset($orderNum[$key]) && $orderNum[$key] > 0) : ?>
                            <div class="order-status-num"><?php echo $orderNum[$key]; ?></div>
                        <?php endif; ?>
                    </a>
                </li>
                <?php $i++; endforeach; ?>
                <li>
                    <a href="<?php echo $loginUrl ? $loginUrl : site_url('home/refund/tourismRefundList'); ?>">
                        <i class="iconfont icon-tuikuanshouhou"></i>
                        <p>退款/售后</p>
                    </a>
                </li>
            </ul>
        </div>
        <div class="user-order order-list">
            <div class="flex">
                <h5 class="flex-1">我的推荐</h5>
            </div>
            <dl class="am-cf">
                <dd>
                    <a href="javascript:;" class="vip upgrade-ing">
                        <i class="iconfont icon-tejia"></i>
                        <p>特价专区</p>
                    </a>
                </dd>
                <dd>
                    <a href="<?php echo 'javascript:;';//site_url('home/discountMall/show'); ?>" class="shop upgrade-ing">
                        <i class="iconfont icon-jifenshangcheng"></i>
                        <p>积分商城</p>
                    </a>
                </dd>
                <dd>
                    <a href="<?php echo site_url('home/apply/applyProvider'); ?>" class="store">
                        <i class="iconfont icon-dianpu"></i>
                        <p>我要供应</p>
                        <div class="new">NEW</div>
                    </a>
                </dd>
                <dd>
                    <a href="<?php echo site_url('home/apply/applySeller'); ?>" class="place">
                        <i class="iconfont icon-fenxiao"></i>
                        <p>我要分销</p>
                    </a>
                </dd>
                <dd>
                    <a href="<?php echo site_url('home/memberprofit/juniorMember'); ?>" class="shoot">
                        <i class="iconfont icon-qunfengyouhuifenrunbili"></i>
                        <p>会员分润</p>
                    </a>
                </dd>
                <dd>
                    <a href="<?php echo site_url('home/ucenter/helpCenter'); ?>" class="help">
                        <i class="iconfont icon-bangzhu"></i>
                        <p>客服中心</p>
                    </a>
                </dd>
                <dd>
                    <a href="<?php echo site_url('home/ucenter/feedback'); ?>" class="shop">
                        <i class="iconfont icon-yijianfankui"></i>
                        <p>意见反馈</p>
                    </a>
                </dd>
            </dl>
        </div>
    </div>
    <div class="user-foot">
        <ul class="flex">
            <li>
                <a href="<?php echo site_url('tourism/tourismprovider/grid') ?>">
                    <i class="iconfont icon-shouye"></i>
                    <p>首页</p>
                </a>
            </li>
            <li>
                <a href="<?php echo site_url('home/discountMall/protection'); ?>">
                    <i class="iconfont icon-tubiao-"></i>
                    <p>消费保障</p>
                </a>
            </li>
            <li>
                <a href="<?php echo site_url('tourism/tourismcart'); ?>">
                    <i class="iconfont icon-gouwuche"></i>
                    <p>购物车</p>
                </a>
            </li>
            <li  class="active">
                <a href="<?php echo site_url('home/ucenter/index');?>">
                    <i class="iconfont icon-wode"></i>
                    <p>我的</p>
                </a>
            </li>
        </ul>
    </div>
<?php $this->load->view('home/layout/footer') ?>
<script type="text/javascript">
    $('.upgrade-ing').click(function (event) {
        myalert('升级中~')
        event.preventDefault();
    });
</script>
